import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode: 'history', // 去掉url中的#
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      component: (resolve) => require(['@/components/HelloWorld'], resolve)
    },
    {
      path: '/news',
      name: '新闻页',
      component: (resolve) => require(['@/components/newsIndex'], resolve)
    },
    {
      path: '/pro',
      name: '详情页',
      component: (resolve) => require(['@/components/proIndex'], resolve)
    }
  ]
})
